from django.template.context_processors import request


class Foo(object):
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def show(self):
        return 123;
    def __getattr__(self, item):
        print(item)
    def __getattribute__(self, item):
        return 123
obj = Foo('xiaoming', 18)
print(obj.name)
obj.xxxx

class HttpRequest(object):
    def __init__ (self):
        pass
    def method(self):
        print("1")

    def path_info(self):
        print("v2")

class DrfRequest(object):
        def __init__(self,req,xxx):
            self._request = req
            self.xxx = xxx

        def __getattr__(self, attr):
            print(attr)
            try:
                return getattr(self._request, attr)
            except AttributeError:
                return self.__getattribute__(attr)
request = HttpRequest()
request =DrfRequest(request,123123)
request
request._request
request._request.method()
request._request.path_info()